package com.neuedu.corejava.ch10test;


import java.util.Iterator;
import java.util.List;

public class ArrayList {
	public static void main(String[] args) {
		List list=new java.util.ArrayList();
		Students students=new Students(1001,"lisi",'男',23);
		Students students2=new Students(1002,"xiaom",'女',22);
		Students students3=new Students(1003,"minmin",'男',22);
		list.add(students);
		list.add(students2);
		list.add(students3);
		
		Iterator iterator=list.iterator();
		while(iterator.hasNext()) {
			Object object=iterator.next();
			Students stu=(Students) object;
			System.out.println(stu);
		}
		System.out.println("======================================");
		for (Object object : list) {
			System.out.println(object);
		}
		System.out.println("===========================================");
		for(int i=0;i<1;i++) {
			System.out.println(list);
		}
		
	}

}
